import Mock from 'mockjs'

//生成店铺列表数据
var shoplist = Mock.mock({
    "list|5": [
        {
            "id|+1": 1,
            "pic": '@image(100x100,@color)',
            "name": '@ctitle',
            "buyCount|10-100": 1,
            "distance|1-10.1":1
        }
    ]
})

//店铺列表 接口
Mock.mock('/shoplist', 'get', function () {
    return shoplist;
})


var goodlist = Mock.mock({
    'list|4': [
        {
            "title|+1": ['三文鱼', '刺身', '年货礼品', '鲍鱼'],
            "content|5": [
                {
                    "id|+1": 1,
                    "name": '@ctitle',
                    "price|10-100": 1,
                    "desc": '@ctitle(20,40)',
                    'pic':'@image(100x100,@color)'
                }
            ]
        }
    ]
})

//商品列表 接口
Mock.mock('/goodlist', 'get', function () {
    return goodlist;
})
